﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;

namespace ReporterEngine
{
    public abstract class BaseMethod
    {
        public abstract bool IsUseable(LexPath.PathToken token);

        public abstract sQuery Execute(LexPath.PathToken token, sQuery query);

        public abstract MethodDescription[] GetMethodNames();

        public Interpreter Interpreter;

        public virtual bool IsAllowed(XElement element,sQuery query)
        {
            return true;
        }
    }

    public class MethodDescription
    {
        public MethodDescription()
        {
            IsUserMethod = true;
        }
        public string Name { get; set; }
        public string Description { get; set; }
        public bool IsUserMethod { get; set; }
    }
}
